import wsgiref.handlers
from google.appengine.ext import webapp 
#from google.appengine.ext.webapp.util import run_wsgi_app 
 
class MainHandler(webapp.RequestHandler): 
    def get(self): 
        #self.response.headers['Content-Type'] = 'text/plain' 
        self.response.out.write('Hello, webapp World!') 
 

def main():
    application = webapp.WSGIApplication( 
                                     [('/.*', MainHandler)], 
                                     debug=True) 
  
    #run_wsgi_app(application)
    wsgiref.handlers.CGIHandler().run(application) 
 
if __name__ == "__main__": 
    main()